/*
 * Copyright 2010. 
 * 
 * This document may not be reproduced, distributed or used 
 * in any manner whatsoever without the expressed written 
 * permission of xrkol Corp. 
 * 
 * $Rev: Rev $
 * $Author: Author $
 * $LastChangedDate: LastChangedDate $
 *
 */

package com.xrkol.sharelib.service;

import java.util.List;

import com.xrkol.sharelib.entity.Clazz;
import com.xrkol.sharelib.entity.Student;
import com.xrkol.sharelib.entity.Teacher;

/**
 * @author peng.xia
 * 
 */
public interface ClassService extends BaseService<Clazz, String> {

    /**
     * 查找班主任所对应的班级
     * 
     * @param currentUser
     * @return
     */
    List<Clazz> getClassesByAdviser(Teacher currentUser);

    /**
     * 获取所有班级
     * 
     * @return
     */
    List<Clazz> getAllClasses(String schoolId);

    /**
     * 分页查询
     * 
     * @param page
     * @return
     */
    List<Clazz> findClassesWithPagination(String schoolId, Integer page);

    List<Clazz> findAllClassesByStudents(List<Student> students);

    Clazz findClassByAdviser(Teacher currentTeacher);

    Clazz getClassByStudent(Student student);

    /**
     * 根据教师查找其所执教和担任班主任的所有班级
     * 
     * @param currentUser
     * @return
     */
    List<Clazz> getClassesByTeacher(Teacher teacher);

    /**
     * 根据教师查找执教的班级
     * 
     * @param currentUser
     * @return
     */
    List<Clazz> getTeachingClassesByTeacher(Teacher teacher);

    /**
     * 班级查重
     * 
     * @param clazz
     * @return
     */
    boolean checkExist(Clazz clazz, String schoolId);

}
